Brief Announcement: Fence Insertion for Straight-line Programs is in P

نویسنده

  • Mohsen Lesani
چکیده

Relaxed memory models reorder instructions in the interest of performance. However, reordering of instructions can jeopardize correctness and memory fences should be used to preserve speci€c orders. Programs that carry explicit fences are over-speci€ed as they are tied to speci€c architectures and memory models and are hence unportable. On the other hand, once the program speci€es the high-level required orders, optimizing compilers can allocate optimum memory fences for multiple architectures. However, the fence insertion problem for general programs is NP-hard. In this paper, we consider fence insertion for straight-line programs. We present a polynomial-time greedy algorithm via reduction to the chain multi-cut problem.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Memorax, a Precise and Sound Tool for Automatic Fence Insertion under TSO

We introduce MEMORAX, a tool for the verification of control state reachability (i.e., safety properties) of concurrent programs manipulating finite range and integer variables and running on top of weak memory models. The verification task is non-trivial as it involves exploring state spaces of arbitrary or even infinite sizes. Even for programs that only manipulate finite range variables, the...

متن کامل

Counter-Example Guided Fence Insertion under Weak Memory Models

We give a sound and complete procedure for fence insertion for concurrent finite-state programs running under the classical TSO memory model. This model allows “write to read” relaxation corresponding to the addition of an unbounded store buffer between each processor and the main memory. We introduce a novel machine model, called the Single-Buffer (SB) semantics, and show that the reachability...

متن کامل

The Best of Both Worlds: Trading Efficiency and Optimality in Fence Insertion for TSO

We present a method for automatic fence insertion in concurrent programs running under weak memory models that provides the best known trade-off between efficiency and optimality. On the one hand, the method can efficiently handle complex aspects of program behaviors such as unbounded buffers and large numbers of processes. On the other hand, it is able to find small sets of fences needed for e...

متن کامل

Faster fully compressed pattern matching algorithm for a subclass of straight-line programs

We show an efficient pattern-matching algorithm for strings that are succinctly described in terms of straight-line programs, in which the constants are symbols and the only operation is the concatenation. In this paper, both text T and pattern P are given by straight-line programs T and P. The length of the text T (pattern P , resp.) may grow exponentially with respect to its description size ...

متن کامل

Automatic Fence Insertion in Integer Programs via Predicate Abstraction

We propose an automatic fence insertion and verification framework for concurrent programs running under relaxed memory. Unlike previous approaches to this problem, which allow only variables of finite domain, we target programs with (unbounded) integer variables. The problem is difficult because it has two different sources of infiniteness: unbounded store buffers and unbounded integer variabl...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2017